package com.zhongzhi.nn.push.server;

import com.zhongzhi.nn.push.dao.LandInfoMapper;
import com.zhongzhi.nn.push.dataSource.MybatisConstants;
import com.zhongzhi.nn.push.model.LandInfo;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class PushLandInfo {



    /**
     * 根据公告id查询推送数据
     *
     * @return
     */
    public List<LandInfo> get(String notcieid) {
        List<LandInfo> list = null;
        SqlSession sqlSession = null;
        try {
            sqlSession = MybatisConstants.getSqlSession();
            LandInfoMapper dao = sqlSession.getMapper(LandInfoMapper.class);
            list = dao.getData(notcieid);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if(sqlSession != null) {
                sqlSession.close();
            }
        }
        return list;
    }
}
